#include "Shape.h"



Shape::Shape()
{
	dxEngine = CDirectXEngine::Instance();

	vertexBuffer = NULL;

	//TODO: creating a metial for each instance probably isnt nessarry
	ZeroMemory(&material, sizeof(D3DMATERIAL9));    // clear out the struct for use
    material.Diffuse.r = material.Ambient.r = 1.0f;    // set the material to full red
    material.Diffuse.g = material.Ambient.g = 1.0f;    // set the material to full green
    material.Diffuse.b = material.Ambient.b = 1.0f;    // set the material to full blue
    material.Diffuse.a = material.Ambient.a = 1.0f;    // set the material to full alpha

}
/*
Shape::Shape( string source )
{
	//TODO: Pull apart the source to get the path and file type
	

}
*/
Shape::~Shape(void)
{
}


void Shape::Draw()
{
	// create the material struct
	CDirectXEngine::Instance()->d3ddev->SetMaterial(&material);    // set the globably-used material to &material	

	mesh->DrawSubset(0);
}